package com.taobao.report.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.taobao.report.dto.comm.ResultEnum;
import com.taobao.report.dto.comm.ResultInfo;
import com.taobao.report.service.inter.SysUserService;

@Controller
public class IndexController {
	
	@Autowired
	private SysUserService userService;
	@RequestMapping("/index")
	public String index() {
		System.out.println("================");
		return "/admin/index";
	}
	@RequestMapping("/")
	public String loginPage(){
		return "/admin/login";
	}
	@RequestMapping("/login")
	@ResponseBody
	public ResultInfo<String> login(){
		userService.selectBy("", "");
		return new ResultInfo<>(ResultEnum.ERROR);
	}
	
}
